// 获取可视区域的高度
export const getViewHeight = (searchHeader,tab)=>{
	let searchHeight = 0,tabHeight = 0, swiperHeight = 0
	if (searchHeader) {
		// 获取搜索栏的高度
		let search = uni.createSelectorQuery().select(searchHeader)	
		search.boundingClientRect((res)=>{
			searchHeight = res.height
		}).exec()
	}
	if (tab) {
		// 获取tabBar的高度
		let tabBar = uni.createSelectorQuery().select(tab)
		tabBar.boundingClientRect((res)=>{
			tabHeight = res.height
		}).exec()
	}
	// 获取可视区域的高度
	uni.getSystemInfo({
		success(res){
			swiperHeight = res.windowHeight - searchHeight - tabHeight
		}
	}) 
	return swiperHeight
}